package com.mall.server.service;

import com.mall.commons.exceotion.BusinessException;
import com.mall.commons.exceotion.ErrorResult;
import com.mall.dubbo.api.OmscompanyAddressApi;
import com.tanhua.model.domain.OmsCompanyAddress;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OmscompanyAddressService {

    @DubboReference
    private OmscompanyAddressApi omscompanyAddressApi;

    //获取所有收货地址
    public List<OmsCompanyAddress> list() {
        List<OmsCompanyAddress> resource = omscompanyAddressApi.listAll();
        if (resource == null) {
            throw new BusinessException(ErrorResult.emptyError());
        }
        return null;
    }
}
